<?php

$req = $_POST;

/*
 * 配置
*/
$foreign_key = 'sid';
$comment = array(
	'table'=>"`".APP_DB."`.`msg`",
	'foreign_key'=>"`sid`",
	'keyvalue' => array(
	'pid'=>intval($req['pid']),
	'uid'=>intval($req['pid']),
	$foreign_key=>intval($req['cfid']),
	'username'=>$req['name'] ? $req['name'] : 'XDA网友',
	'content'=>$req['content'],
	'score'=>0,
	'agree'=>0,
	'against'=>0,
	'status'=>intval($req['status']),
	'ctime'=>time(),
	'ip'=>$_SERVER['REMOTE_ADDR'],
	),
	'notempty'=>array('username', 'content'),
	'limit'=>5,
	'cookiename'=>'xda_comment',
);


?>